<?php
/**
 * Created by PhpStorm.
 * User: zouhua
 * Date: 2017/6/25
 * Time: 16:24
 */

namespace app\controllers;


use app\components\WebAuthController;
use app\models\ActivityApply;
use app\models\User;

class ResumeController extends WebAuthController {

    public $layout = 'detail';

    public function actionIndex() {
        $apply_id = intval($this->getParam('apply_id'));
        $model = ActivityApply::findOne($apply_id);
        if (!$model || $model->pub_uid != $this->user->id) {
            return $this->redirect(['user/']);
        }

        $uid = intval($this->getParam('uid'));
        $user = User::findOne($uid);
        if (!$user) {
            return $this->redirect(['user/']);
        }

        $this->view->title = '个人简历';
        return $this->render(compact('user', 'model'));
    }
}